﻿<?php
	require_once('conexao.class.php');
	session_start();
	session_unset();
	session_destroy();
	$c = new conexao;
	$c->set_charset('utf8');
	$q = "INSERT INTO logs(usuario, acao, data) VALUES('" . $_SESSION['username'] . "', 'Efetuou logout do sistema.', now());";
	$c->query($q);
	header('Location: index.php');
?>